package com.yohann.course_service.mapper;

import com.yohann.course_service.entity.Course;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yohann.course_service.entity.vo.CourseInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程 Mapper 接口
 * </p>
 *
 * @author Yohann
 * @since 2020-10-18
 */
public interface CourseMapper extends BaseMapper<Course> {

    /**
     * 根据id查询课程
     */
    CourseInfo getCourseInfoById(@Param("id") int id);

    /**
     * 分页查询课程分类
     */
    List<CourseInfo> pageQueryCourse(Map<String, Object> queryMap);

    /**
     * 分页查询课程分类
     */
    Integer pageQueryCourseCount(Map<String, Object> queryMap);

    /**
     * 根据id查询课程信息
     */
    List<CourseInfo> getCourseInfoByIds(@Param("ids") List<Integer> ids);
}
